<?php require_once '../../libraries/config.php';?>
<?php require_once '../../libraries/database.php';?>
<?php require_once '../../libraries/products.php';?>
<?php
$name = $_GET['name'];
$pro = new product();
$listpro_name = $pro->getpro_name($name);
if($name == NULL){
	echo 1;
}else{
	if($listpro_name != NULL){
		foreach ($listpro_name as $items){
			echo "<tr>";
				echo "<td><a href='".baseurl."?page=product&act=detail&pid=$items[pro_id]'>$items[pro_name]</a></td>";
			echo "</tr>";
		}
	}else{
		echo "<tr>";
			echo "<td>No result</td>";
		echo "</tr>";
	}
}
?>